package org.zhongyin.Algorithm;

public class Element {
	
	private int value; //value of the element
	private boolean mobile; // mobile or not
	private int direction; // Direction
	
	public Element(int elCharacter, boolean mobile, int direction){
		this.value = elCharacter;
		this.mobile = mobile;
		this.direction = direction;
	}
	
	public boolean isMobile(){
		return this.mobile;
	}
	
	public void inverseDirection(){
		if(direction == Direction.LEFT){
			direction = Direction.RIGHT;
		}
		else{
			direction = Direction.LEFT;
		}
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public int getDirection() {
		return direction;
	}

	public void setDirection(int direction) {
		this.direction = direction;
	}

	public void setMobile(boolean mobile) {
		this.mobile = mobile;
	}
	
	

}
